<template>
  <div>
    <div ref="box"></div>
  </div>
</template>
<script>
/**
 * 获取dom节点
 */
import { ref, onMounted } from "vue";
export default {
  setup() {
    let box = ref(null);
    onMounted(() => {
      console.log(box.value);
    });
    return {
      box,
    };
  },
};
</script>
